package com.hjj.controller;

import com.powernode.commons.Result;
import com.hjj.controller.template.BaseController;
import com.powernode.pojo.User;
import com.hjj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController extends BaseController<User> {

    @Autowired
    private UserService userService;

    @Override
    public Result addItem(User user) {
        return null;
    }
    @Override
    public Result findByList() {
        //熔断器测试
//        try {
//            Thread.sleep(3000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        return Result.OK(userService.findByList());
    }
    @Override
    public Result delById(int id) {
        return null;
    }

    @Override
    public Result findById(int id) {
        return null;
    }

    @Override
    public Result editById(User user) {
        return null;
    }
}
